<template>
  <div>
    <TypeNav/>
    <ListContainer/>
    <Recommend/>
    <Rank/>
    <Like/>
    <Floor v-for="(item,index) in floorList" :key="item.id" :floorList="item"/>
    <Brank/>
  </div>
</template>

<script>
import TypeNav from "@/components/TypeNav/TypeNav.vue";
import ListContainer from "@/pages/Home/ListContainer/ListContainer.vue";
import Recommend from "@/pages/Home/Recommend/Recommend.vue";
import Rank from "@/pages/Home/Rank/Rank.vue";
import Like from "@/pages/Home/Like/Like.vue";
import Floor from "@/pages/Home/Floor/Floor.vue";
import Brank from "@/pages/Home/Brank/Brank.vue";
import {mapActions, mapMutations, mapState} from "vuex";
import {getUserInfo} from "@/api";

export default {
  name: "Home",
  components: {Brank, Floor, Like, Rank, TypeNav,ListContainer,Recommend},
  computed:{
    ...mapState('home',['floorList'])
  },
  methods:{
  },
  mounted() {
    try {
      this.$store.dispatch('home/reqFloorList');  //请求floor数据
      this.$store.dispatch('user/getUserInfo'); //获取用户信息
    }catch (e) {
      alert(e.message);
    }

  }
}
</script>

<style scoped>

</style>